function request(params) {
	const token = uni.getStorageSync('token')
	return new Promise((resolve, reject) => {
		uni.showLoading({ title: '加载中' })
		uni.request({
			...params,
			header: { Authorization: token },
			success: ({ data }) => {
				resolve(data)
			},
			complete() {
				uni.hideLoading()
			},
		})
	})
}
export default request
